# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>

pkgname=python-systemd
pkgver=234
pkgrel=8
pkgdesc="Python bindings for systemd"
arch=(x86_64)
url="https://github.com/systemd/python-systemd"
license=(LGPL)
depends=(python3 libsystemd)
makedepends=(systemd python git)
_commit=308ae4440c1f6ea1aff9be4cb683c52bd3a1c13a  # tags/v234^0
source=("$pkgname::git+${url}#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/^v//;s/-/+/g'
}

build() {
  cd $pkgname
  make PYTHON=/usr/bin/python3
}

package() {
  cd $pkgname
  python3 setup.py install --root="$pkgdir" --optimize=1 --skip-build
}
